
*-----------------------------------------------------------------------------
**                        Does a UBI affect voter turnout                   **
**                       Individual Data Replication File                   **
*-----------------------------------------------------------------------------


use "data_ubiturnout_individual.dta", clear

** Table 3 : Linear Probability Model, Individual Level DiD Estimates, CPS Voter Supplement

eststo I1: quietly reg voted i.treatyear##i.alaska i.year i.id if year<1984, vce(cluster id)
eststo I4: quietly reg voted i.treatyear##i.alaska i.year i.id if year<1992, vce(cluster id)
eststo I7: quietly reg voted i.treatyear##i.alaska i.year i.id, vce(cluster id)

eststo I2: quietly reg voted i.treatyear##i.alaska agegroup female i.race4 hisp i.empstat educ i.year i.id if year<1984, vce(cluster id)
eststo I5: quietly reg voted i.treatyear##i.alaska agegroup female i.race4 hisp i.empstat educ i.year i.id if year<1992, vce(cluster id)
eststo I8: quietly reg voted i.treatyear##i.alaska agegroup female i.race4 hisp i.empstat educ i.year i.id, vce(cluster id)

eststo I3: quietly reg voted i.treatyear##i.alaska agegroup female i.race4 hisp i.empstat educ lnpop lnrgdp_pc gini edr i.year i.id if year<1984, vce(cluster id)
eststo I6: quietly reg voted i.treatyear##i.alaska agegroup female i.race4 hisp i.empstat educ lnpop lnrgdp_pc gini edr i.year i.id if year<1992, vce(cluster id)
eststo I9: quietly reg voted i.treatyear##i.alaska agegroup female i.race4 hisp i.empstat educ lnpop lnrgdp_pc gini edr i.year i.id, vce(cluster id)

esttab I1 I2 I3 I4 I5 I6 I7 I8 I9 using Table3.rtf, replace b(%9.3f) se(%9.3f) stats(N r2, labels("N. of Obs." "R2") fmt(%9.0fc %9.3f)) onecell nogaps varwidth(14) modelwidth(6) varlabels(_cons Constant) label title("Linear Probability Model, Individual Level DiD Estimates") mlabels("1978-1982" "1978-1982" "1978-1982" "1978-1990" "1978-1990" "1978-1990" "1978-2000" "1978-2000" "1978-2000") nonotes addnotes("Notes: Regression coefficients shown with robust standard errors in parentheses that are clustered by state. Not in labor force is denoted as NILF. Dividend dummy is coded 1 for Alaska after the introduction of the dividend and 0 otherwise and is an interaction of a dummy for Alaska and a dummy for the treatment period starting in 1982. The significance of the estimation coefficients is reported as ***p<0.01, **p<0.05, *p<0.1.")



** Table 4 : Heterogenous Effects - Educational Attainment

graph drop _all

***ST
eststo edst: reg voted alaska treatyear i.dividend##c.educ agegroup educ female i.race4 hisp i.empstat lnpop lnrgdp_pc gini edr i.year i.id if year<1984, vce(cluster id)
margins, dydx(dividend) at(educ=(0(1)7)) post

marginsplot, recastci(rline) ciopts(lpattern(dash)) recast(line) legend(off) addplot( hist educ if id==2 & year<1984, percent xla(0/7, valuelabel noticks) barw(0.4) xlabel(, angle(45)) mfcolor(none) fcolor(none) lcolor(gs10) yaxis(2) yscale(alt axis(2))) scheme(s2mono) title("1978-1982") name(educs_graph)

***MT
eststo edmt: reg voted alaska treatyear i.dividend##c.educ agegroup educ female i.race4 hisp i.empstat lnpop lnrgdp_pc gini edr i.year i.id if year<1992, vce(cluster id)
margins, dydx(dividend) at(educ=(0(1)7)) post

marginsplot, recastci(rline) ciopts(lpattern(dash)) recast(line) legend(off) addplot( hist educ if id==2 & year<1992, percent xla(0/7, valuelabel noticks) barw(0.4) xlabel(, angle(45)) mfcolor(none) fcolor(none) lcolor(gs10) yaxis(2) yscale(alt axis(2))) scheme(s2mono) title("1978-1990") name(educm_graph)

***LT
eststo edlt: reg voted alaska treatyear i.dividend##c.educ agegroup educ female i.race4 hisp i.empstat lnpop lnrgdp_pc gini edr i.year i.id, vce(cluster id)
margins, dydx(dividend) at(educ=(0(1)7)) post

marginsplot, recastci(rline) ciopts(lpattern(dash)) recast(line) legend(off) addplot( hist educ if id==2, percent xla(0/7, valuelabel noticks) barw(0.4) xlabel(, angle(45)) mfcolor(none) fcolor(none) lcolor(gs10) yaxis(2) yscale(alt axis(2))) scheme(s2mono) title("1978-2000")name(educl_graph)

esttab edst edmt edlt using Table4.rtf, replace b(%9.3f) se(%9.3f) stats(N r2, labels("N. of Obs." "R2") fmt(%9.0fc %9.3f)) onecell nogaps varwidth(14) modelwidth(6) varlabels(_cons Constant) label title("Heterogenous Effects - Educational Attainment") mlabels("1978-1982" "1978-1990" "1978-2000" ) nonotes addnotes("Notes: Regression coefficients shown with robust standard errors in parentheses that are clustered by state. Coefficients for the fixed effects are not reported. ***p<0.01, **p<0.05, *p<0.1.")



** Figure 2 : Marginal Effect of Dividend on Turnout in Alaska with 95% CI

graph combine educs_graph educm_graph educl_graph, title("Marginal Effect of Dividend on Turnout in Alaska with 95% CI") rows(1) ycommon scheme(s2mono)
graph export Figure2.pdf, replace

*-----------------------------------------------------------------------------
***                               APPENDIX                                 ***
*-----------------------------------------------------------------------------



** Table A3 : Variable Summary Statistics

*Alaska 
sum voted age i.race5 female hisp i.empstat educ if id==2
tabstat voted age female hisp educ if id==2, statistics(median)

*All other U.S. States
sum voted age i.race5 female hisp i.empstat educ if id!=2
tabstat voted age female hisp educ if id!=2, statistics(median)



** Table A10: Education as a Predictor for Income in Alaska

*is educ good predictor for inc. in alaska? --> yes
eststo pred1: reg faminc i.alaska##c.educ i.year if year>1980, vce(cluster id)
esttab pred1 using TableA10.rtf, indicate("Year FEs = *year*") replace b(%9.3f) se(%9.3f) stats(N r2, labels("N. of Obs." "Within R2") fmt(%9.0fc %9.3f)) onecell nogaps varwidth(14) modelwidth(6) varlabels(_cons Constant) label title("Education as a Predictor for Income in Alaska") mlabels("1982-2000") nonotes addnotes("Notes: The significance of the estimation coefficients is reported as ***p<0.01, **p<0.05, *p<0.1.")



** Table A11: Heterogeneous Treatment Effects, by Race

eststo race5st: quietly reg voted treatyear alaska i.dividend##i.race5 female hisp i.empstat i.race5 educ lnpop lnrgdp_pc gini edr i.year i.id if year<1984, vce(cluster id)
quietly margins, dydx (dividend) at(race5=(1 2 5)) post
est store racest

eststo race5mt: quietly reg voted treatyear alaska i.dividend##i.race5 female hisp i.empstat i.race5 educ lnpop lnrgdp_pc gini edr i.year i.id if year<1992, vce(cluster id)
quietly margins, dydx (dividend) at(race5=(1 2 3 4 5)) post
est store racemt

eststo race5lt: quietly reg voted treatyear alaska i.dividend##i.race5 female hisp i.empstat i.race5 educ lnpop lnrgdp_pc gini edr i.year i.id, vce(cluster id)
quietly margins, dydx (dividend) at(race5=(1 2 3 4 5)) post
est store racelt

esttab race5st race5mt race5lt using TableA11.rtf, replace b(%9.3f) se(%9.3f) stats(N r2, labels("N. of Obs." "R2") fmt(%9.0fc %9.3f)) onecell nogaps varwidth(14) modelwidth(6) varlabels(_cons Constant) label title("Heterogenous Effects") mlabels("S-T" "S-T" "S-T" ) nonotes addnotes("Notes: Regression coefficients shown with robust standard errors in parentheses (standard errors for the fixed effects model are clustered by state). Number of Observations is denoted as N. of Obs. Coefficients for the fixed effects are not reported. The significance of the estimation coefficients is reported as ***p<0.01, **p<0.05, *p<0.1.")



** Figure A3 : Marginal Effect of Dividend on Turnout with 95% CI, by Race

coefplot (racest, label(1978-1982)) (racemt, label(1978-1990)) (racelt, label(1978-2000)), scheme(s2mono)  legend(rows(1)) ylabel(1 "White" 2 "Black" 3 "American Indian/Aleut" 4 "Asian/Pacific Islander" 5 "Other") legend (label (1 "1978-1982"))
graph export FigureA3.pdf, replace


graph drop _all

** Table A12 : Heterogeneous Treatment Effects, by Agegroup

*ST
eststo agest: reg voted alaska treatyear i.dividend##c.agegroup agegroup educ female i.race4 hisp i.empstat lnpop lnrgdp_pc gini edr i.year i.id if year<1984, vce(cluster id)
margins, dydx(dividend) at(agegroup=(1/6)) post
marginsplot, recastci(rline) ciopts(lpattern(dash)) recast(line) legend(off) addplot( hist agegroup if id==2 & year<1984, percent xla(1/6, valuelabel noticks) barw(0.4) xlabel(, angle(45)) mfcolor(none) fcolor(none) lcolor(gs10) yaxis(2) yscale(alt axis(2))) scheme(s2mono) title("1978-1982") name(ages_graph)

eststo agemt: reg voted alaska treatyear i.dividend##c.agegroup agegroup educ female i.race4 hisp i.empstat lnpop lnrgdp_pc gini edr i.year i.id if year<1992, vce(cluster id)
margins, dydx(dividend) at(agegroup=(1/6)) post
marginsplot, recastci(rline) ciopts(lpattern(dash)) recast(line) legend(off) addplot( hist agegroup if id==2 & year<1992, percent xla(1/6, valuelabel noticks) barw(0.4) xlabel(, angle(45)) mfcolor(none) fcolor(none) lcolor(gs10) yaxis(2) yscale(alt axis(2))) scheme(s2mono) title("1978-1990") name(agem_graph)

eststo agelt: reg voted alaska treatyear i.dividend##c.agegroup agegroup educ female i.race4 hisp i.empstat lnpop lnrgdp_pc gini edr i.year i.id, vce(cluster id)
margins, dydx(dividend) at(agegroup=(1/6)) post
marginsplot, recastci(rline) ciopts(lpattern(dash)) recast(line) legend(off) addplot( hist agegroup if id==2, percent xla(1/6, valuelabel noticks) barw(0.4) xlabel(, angle(45)) mfcolor(none) fcolor(none) lcolor(gs10) yaxis(2) yscale(alt axis(2))) scheme(s2mono) title("1978-2000") name(agel_graph)


esttab agest agemt agelt using TableA12.rtf, replace b(%9.3f) se(%9.3f) stats(N r2, labels("N. of Obs." "R2") fmt(%9.0fc %9.3f)) onecell nogaps varwidth(14) modelwidth(6) varlabels(_cons Constant) label title("Heterogenous Effects") mlabels("S-T" "S-T" "S-T" ) nonotes addnotes("Notes: Regression coefficients shown with robust standard errors in parentheses (standard errors for the fixed effects model are clustered by state). Number of Observations is denoted as N. of Obs. Coefficients for the fixed effects are not reported. The significance of the estimation coefficients is reported as ***p<0.01, **p<0.05, *p<0.1.")



** Figure A4 : Marginal Effect of Dividend on Turnout in Alaska with 95% CI, by Age

graph combine ages_graph agem_graph agel_graph, title("Marginal Effect of Dividend on Turnout in Alaska with 95% CI, by Age", size(medium)) rows(1) ycommon scheme(s2mono)
graph export FigureA4.pdf, replace


** Table A13 : See Table 3 

** Table A14 : Generalized DiD, Individual-Level Data 

eststo GDD1: quietly reg voted i.alaska##c.div1000 i.year i.id agegroup female i.race4 hisp i.empstat educ lnpop lnrgdp_pc gini edr if year<1984, vce(cluster id)
eststo GDD2: quietly reg voted i.alaska##c.div1000 i.year i.id agegroup female i.race4 hisp i.empstat educ lnpop lnrgdp_pc gini edr if year<1992, vce(cluster id)
eststo GDD3: quietly reg voted i.alaska##c.div1000 i.year i.id agegroup female i.race4 hisp i.empstat educ lnpop lnrgdp_pc gini edr, vce(cluster id)
**post 1982
eststo GDD4: quietly reg voted i.alaska##c.div1000 i.year i.id agegroup female i.race4 hisp i.empstat educ lnpop lnrgdp_pc gini edr if year>1980 & year<1992, vce(cluster id)
eststo GDD5: quietly reg voted i.alaska##c.div1000 i.year i.id agegroup female i.race4 hisp i.empstat educ lnpop lnrgdp_pc gini edr if year>1980, vce(cluster id)


esttab GDD1 GDD2 GDD3 GDD4 GDD5 using TableA11.rtf, replace b(%9.3f) se(%9.3f) stats(N r2, labels("N. of Obs." "Within R2") fmt(%9.0fc %9.3f)) onecell nogaps varwidth(14) modelwidth(6) varlabels(_cons Constant) label title("Generalized DiD Fixed-Effects Model with clustered standard errors") mlabels("Short-Term 1978-1982" "Medium-Term 1978-1990" "Long-Term 1978-2000" "Post-Introduction 1982-1990" "Post-Introduction 1982-2000") nonotes addnotes("Notes: Regression coefficients shown with robust standard errors in parentheses that are clustered by state. Not in labor force is denoted as NILF. Number of Observations is denoted as N. of Obs. Dividend in USD / 1000 is the dividend payment in 2016 dollars. The significance of the estimation coefficients is reported as ***p<0.01, **p<0.05, *p<0.1.")



